<template>
  <div id="app" style="width:100%;height: 100%">
<!--    <scale-box :width="scaleBoxWidth" :height="scaleBoxHeight" bgc="transparent" :delay="100" :isFlat="true">-->
      <router-view/>
<!--    </scale-box>-->
  </div>
</template>

<script>
//分辨率自适应
// import ScaleBox from "vue2-scale-box";

import {JSEncrypt} from "jsencrypt";

export default {
  name: 'App',
  // components: {ScaleBox},
  data() {
    return {
      scaleBoxWidth: 2560,
      scaleBoxHeight: 1279,
    }
  },
  mounted() {
    let publicKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtJy0nsaFOfaeU/lxysrT\n' +
        '0Eo5qlNJnWYJG1BxwuUOJqRz2uvsLeuK6KiBM4LdTpuKkW37nh8RaHM2XG3ynPPv\n' +
        'LiGdxx2C7/wm7fjojycCj1fQWPQwwv9kmHyc0y4WgHsjpKM5sPp1VgrIyWpDbLdi\n' +
        'D4+6+yanhe272vgCcsuA/KZoDvRyVN3p8TZjIh35eBKOssd/vf7DwGZ1Xhdw8SXr\n' +
        '6ONJ/GUjkXbZBkOwhaGYCbF1M1Fk5lvYSkHbd7S0Cm1qYagmRRgECWv1JRaKS3+5\n' +
        '7q7TvcocFcMJxQlm/aKkWi/jIsTQdkkUKU0i4OiawaxKn2W/hgn9fceGQQ0B/kdV\n' +
        '5wIDAQAB'
    let privateKey = 'MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC0nLSexoU59p5T\n' +
        '+XHKytPQSjmqU0mdZgkbUHHC5Q4mpHPa6+wt64roqIEzgt1Om4qRbfueHxFoczZc\n' +
        'bfKc8+8uIZ3HHYLv/Cbt+OiPJwKPV9BY9DDC/2SYfJzTLhaAeyOkozmw+nVWCsjJ\n' +
        'akNst2IPj7r7JqeF7bva+AJyy4D8pmgO9HJU3enxNmMiHfl4Eo6yx3+9/sPAZnVe\n' +
        'F3DxJevo40n8ZSORdtkGQ7CFoZgJsXUzUWTmW9hKQdt3tLQKbWphqCZFGAQJa/Ul\n' +
        'FopLf7nurtO9yhwVwwnFCWb9oqRaL+MixNB2SRQpTSLg6JrBrEqfZb+GCf19x4ZB\n' +
        'DQH+R1XnAgMBAAECggEBAJfwoK5VuaxagTWJyqXcXbaDSuGz8WD9frnAwgNAKNhv\n' +
        'TpukD2tOFOzHHPIVrFG93iOcD6ok3sMs8VVulURenh8D3rSsagOz75gQ5qvPGIM4\n' +
        'T6kVvJO+wITbiB7MTdfGP+T3/8eX2/AHYIS45YHnABKxSo6QJSwxI/EA5SZndtqT\n' +
        'Q699AO+QpRJXSSnDapOH5G4ALHk1QzA96SukkJDy3aVeWFI6FnOSSMTLOW4mitGi\n' +
        '73OmV5lt4nIFI+udMUGsIodn54rF0Ctc+6pT7ysY5a689LavNkU7roQEH1bvZs5r\n' +
        '9dx/1dh53Z7DR0hQzzNcuzpkCweYveCrnSg+jpGLhQECgYEA7YtVEtL6/wrZF0V+\n' +
        'zylYD7WctWyHi7Rzjh5PN5y/gVLCYT8D5H1UZvBWH1ZnihP6yf3rB67RagkrRZHp\n' +
        'waaue9AOxZxM0rnVUO+kuWuZI2287WFvc6GVfigMuBEc/ivA1au1Dtj2abldW+eu\n' +
        'wtjBTbemMkJ6TIo6u6FUejHyiYECgYEAwqUDmzyCBcQjCyguA+0WLuRn+3067aKa\n' +
        '/n7kA2LJpotkq6ZOKfLQufDM0RfmHN+SGi0v0WOgdYtxjsRCGX8L9X57B3Lkd2o1\n' +
        'NxlBwophO5zJtbgS7HLQIKylX5QiEdxYfnoFT9ew1PBzP3cA8kmoOAq/kYTULY2I\n' +
        'tMhLouHVg2cCgYBSVRewhZXfbigea8TvEppmH4FoVGyKnInsuU6lrNunfELJJ+k2\n' +
        'ecYWQ7jl9bG/ZvtmpW6f5BTLVtA7tb46k4Yofc2Q6oKqCyUHf3gtmECkyfVQpZPW\n' +
        'lSvWZRU7exr8cbfNl00TD1og/NGB+ERXXn9pa3zcMLRo8QQ4YkuAau1wgQKBgQCo\n' +
        'tSZfEx8PqGVHclgQBxtHIaoPDQhamKoHFCzF0oY92Gw1azwsl83anKCqSzCkrhOQ\n' +
        'pMHhl5yoxWhz+h/gwYG4ExzH5Amqh2AAld+towuMA+XBn/6m+wzyhTIBmf+9w2Lg\n' +
        'nRqljaozpwX9aERlvPoVORu6IYtWwGpRZ5pHX78U2QKBgQCFsXtnYPYOsHAnVisF\n' +
        'TAkbivwm9A9cGems0Z/BxSX0clyWENQDfRKY0M31DX+8nOQqR44Nza94AzR8/d07\n' +
        'MFEKlkyY9/hk6rPjIFGEOFAjgLPfpTM16hk4QOU76q3Lm7bjVWS5NV9dEecG02rJ\n' +
        'DhgZeqLxoq0YjEdmCT+7RuVHaA=='
    // let encryptData = this.RSAencrypt("{\"title\":\"java\"}",publicKey);
    // let decryptData = this.RSAdecrypt(encryptData,privateKey);
    // console.log(encryptData,decryptData)
  },
  methods:{
//加密方法
    RSAencrypt(pas,publicKey){
      //实例化jsEncrypt对象
      let jse = new JSEncrypt();
      //设置公钥
      jse.setPublicKey(publicKey);
      console.log('加密：'+jse.encrypt(pas))
      return jse.encrypt(pas);
    },
//解密方法
    RSAdecrypt(pas,privateKey){
      let jse = new JSEncrypt();
      // 私钥
      jse.setPrivateKey(privateKey)
      console.log('解密：'+jse.decrypt(pas))
      return jse.decrypt(pas);
    },


  }
}
</script>

<style>
html, body, #app {
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
}

#app {
  background-image: linear-gradient(rgba(0 0 0 / 30%), rgba(0 0 0 / 31%)), url("assets/background.jpg");
  background-repeat: no-repeat;
  background-size: cover;
}
</style>
